package com.aaa.ssm.controller;

import com.aaa.ssm.entity.SysUser;
import com.aaa.ssm.service.impl.AreaServiceImpl;
import com.aaa.ssm.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@RestController //@Controller+@ResponseBody
@RequestMapping("area")
public class AreaController extends BaseController{
    @Resource
    private AreaServiceImpl areaService;
    @GetMapping("queryAllTreeData")
    public Result  queryAllTreeData(){
        return success(areaService.queryAll());
    }
    /**
     * 根据用户编号查询树数据
     * @param name
     * @return
     */
    @GetMapping("queryTreeDataByName")
    public Result  queryTreeDataByName(String name){
        return success(areaService.queryByName(name));
    }
//    @GetMapping("queryAllTreeData")
//    public Result  queryAllTreeData(){
//        return success(areaService.queryTreeData());
//    }
//    /**
//     * 根据用户编号查询树数据
//     * @param name
//     * @return
//     */
//    @GetMapping("queryTreeDataByName")
//    public Result  queryTreeDataByName(String name){
//        return success(areaService.queryTreeDataByName(name));
//    }

}
